//
//  YIem_Find_Topics_VIewModel.m
//  B段_开眼
//
//  Created by YIem on 16/4/28.
//  Copyright © 2016年 Howie. All rights reserved.
//

#import "YIem_Find_Topics_VIewModel.h"

@implementation YIem_Find_Topics_VIewModel
+ (void)getDataWithPage:(NSString *)nextPage andUpdate:(BOOL)isUpdate andBlock:(void (^)(NSMutableArray *))tableArr
{
    NSMutableArray *array = [NSMutableArray array];
    [CustomerNetWorking connectWithURL:nextPage andUpdate:YES andBlock:^(id response) {
    
        
        for (NSDictionary *dic in [response objectForKey:@"itemList"]) {
            
            YIem_Find_Topics_CellModel *model = [[YIem_Find_Topics_CellModel alloc] init];
            [model setValuesForKeysWithDictionary:[dic objectForKey:@"data"]];
            
            [array addObject:model];

        }
        
        tableArr (array);
    }];
    
}
@end
